Note

  1. Learn how to design trading strategy from Rob
  1. Refine the instrument level through portfolio level

A) Acknowledgments

All the information contained in this document is drawn from my personal experience, as well as insights gleaned from the books written by Robert Carver.

B) Things to know

Backtesting Advice

  • Keep it simple: more complicate will lead to over-fitting.
  • Fewer alternatives: More variation, more likely to select unprofitable rule by chance. (Multiple Comparisons problem)
  • Use expanding out of sample or rolling (walk forward) with proper period
  • Don’t drop rules casually: since it is unlikely to differentiate rule’s performance.
  • Pull data across instruments.
  • Compare on the same return distributions: positive shewed with positive shewed.
  • Compare return relatively to benchmarks.
  • Use weighted average of rules: Single rule will lead to overconfident, and it is unlikely to prove that which one is better.
  • If correlation of two rules are more than .95 then we can drop one.
  • Drop too slow due to law of active management.
  • Drop too fast since high cost
  • Don’t drop rule purely because performance.

Backtesting Problem

  1. Overfitting

    • Type of fitting: Explicit, Implicit and Tatic.
    • Too much variation (too many degree of freedom) - “multiple comparisons problem”
    • Not enough data (need more than 30 years for rule that highly correlated of 0.8)
    • Too complex system.
  2. Survivorship bias

    • Not consider a delisted stock.
  3. Implementation

    • Cost
    • Liquidity
    • Capital limit
  4. Data correctness

    • Mislead data: wronge price from split, XD, etc.
    • Bias data: : single big jump

Backtesting Approach

  1. In sample
  2. Half out of sample
  3. Expanding out of sample (anchored fitting): Recommended!
  4. Rolling out of sample (walk forward)

Checking Robustness

  1. parameter sensitivity
  2. Lag of signal
  3. Additional slippage
  4. Include all market condition, fake crisis, weakness environment.

Components of System

  1. Universe: tradable markets.
  2. Buy/Sell Engine: buy/sell conditions with parameters.
  3. Position Sizing: how much to buy/sell
  4. Execution: execution methods.
  5. Rebalancing period

C) Designing System

1. Instrument Level through Portfolio Level

Single Instrument Level

Understand characteristic of trading rules

  • Get the characteristic of instrument given param, cost, speed, objective and correlation.
  • Parameter selection: Select or drop parameter
  • Compare with naive approach: buy and hold, random entry exit.
  • Use random data

Understand characteristic of position sizing method

  • Compare with naive approach: standardized volatility, fix percentage
  • Apply pyramid approach.

Analyze trading rule along with position sizing method

  • Prove that given trading rule with particular position sizing method outperform naive.

Portfolio Level

  • Apply portfolio level to include diversification benefits by apply it on three level: Avg of single instrument (no diversification), diversify through same asset class, diversify through different asset class.

2. Designing a Trading Strategy.

  1. understand characteristic of small number of variation or rule
    • Behavior: how it behave in a paricular type of market.

    • Characteristic: Speed, trend length.

    • Correction among variations: Check structure - use square root of 2

    • Cost: Check costs of max and min cost of trading

  • Plot

    • window length on x with sharp ratio on y [systematic trading - page 59]

    1. Allocate forecast weight to each variation with consideration of uncertainty of sharp ratio (Real data: return)

3. My own method

Position Sizing method testing

  • Use random entry and exit
  1. Test with fake and real data
    • % fix cash target

    • % fix volatility target

    • % fix volatility via expected sharp.

  2. Check tactic
    • Pyramid
  • Verify performance

Concept testing

  1. Initiate behaviour: explanation source of inefficiency. (risk averse)
  2. State the concept: (e.g. cut loss and let profit run)
  3. Come up with model: (try Doncian channel or EMA)
  4. Use fake data (vary direction, and volatility)
  5. Test it: get characteristic and performance. (e.g. return, behavior)
  6. Break it: try to fail. (check robustness)
    • Test all model, it must work both if the concept hold.

Empricial testing

  1. Use all market and longest all possible. (e.g. risk averse apply to any asset traded by human.)
  2. Pick single model. (EMA)
  3. Check the characteristic of model if it align with fake data.
  4. Test it
  5. Break it.

Live testing

  1. Monitoring system performance and characteristic.
  2. Gathering feedback and send to research and development.